/*
 * @(#)UserRepository.java $version 2012. 4. 4.
 *
 * Copyright 2012 NHN Corp. All rights Reserved. 
 * NHN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

package com.mywep.myalimi.repository.user;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.mywep.myalimi.model.User;

import com.nhncorp.lucy.spring.core.util.ExtendedMap;

/**
 * @author 한지웅
 */
public class UserRepository extends SqlMapClientDaoSupport {

	public int countByExample(ExtendedMap param) {
		return (Integer)getSqlMapClientTemplate().queryForObject("user.countByExample", param);
	}

	@SuppressWarnings("unchecked")
	public List<User> selectByExample(ExtendedMap param) {
		return getSqlMapClientTemplate().queryForList("user.selectByExample", param);
	}

	@SuppressWarnings("unchecked")
	public User selectByPrimaryKey(User param) {
		return (User)getSqlMapClientTemplate().queryForObject("user.selectByPrimaryKey", param);
	}

	public Integer insert(User param) {
		return (Integer)getSqlMapClientTemplate().insert("user.insert", param);
	}

}
